package jse;

import java.util.ArrayList;
import java.util.List;

public class TestListAndBuffer {
	public static void main(String[] args) {
		StringBuilder bf=new StringBuilder();
		bf.append("中");
		bf.append("国");
		bf.append("北");
		bf.append("京");
		
		System.out.println(bf);
		System.out.println(bf.charAt(2));
		List<String> list=new ArrayList<String>();
		list.add("中");
		list.add("国");
		list.add("北");
		list.add("京");
		System.out.println(list);
		System.out.println(list.indexOf("京"));
		System.out.println(list.get(3));
	}
	
}
